<template>
	<view class="main">
		<view class="button" @click="goto()">开始录入</view>
		<view class="button2" @click="goto2()">查看数据</view>
	</view><!-- main end-->
</template>

<script>
	// import {image_upload} from "@/api/common";
	// import {confirm} from "@/api/work";
	import {
		toLogin
	} from '@/libs/login.js';
	import {
		mapState,
		mapGetters
	} from "vuex";
	export default {
		computed: {
			...mapGetters({
				isLogin: 'isLogin'
			})
		},
		data() {
			return {
				
			}
		},
		onLoad(options) {
			
			
		},
		onShareTimeline() {
			return {
				title: '采集问题',
				//分享朋友圈的参数
				query: "isShare=1&id=",
			}
		},
		onShareAppMessage(){
		},
		created() {
			
		},
		onShow:function(){
			
			
		},
		onHide:function(){
			if(this.hasCache){
			}
		},
		onUnload:function(){
			uni.removeStorageSync('storage_key');
			// console.info('onunload');
			// if(this.hasCache){
			// 	console.info('开始缓存onunload');
			// 	this.saveCache();
			// }
		},
		methods: {
			goto(){
				if (this.isLogin == false) {
					toLogin()
					return;
				}
				uni.navigateTo({
					url:'/pages/index/data'
				});
			},
			goto2(){
				if (this.isLogin == false) {
					toLogin()
					return;
				}
				uni.navigateTo({
					url:'/pages/index/list/index'
				});
			}
		}
	}
</script>

<style lang="scss">
	page {
	  width: 100%;
	  height: 100%;
	  background-color: white;
	}
	.main {
		display: flex;
		flex-direction: column;
		align-items: center;
		
		.button{
			width: 90%;
			height: 80rpx;
			background-color: $uni-main-color;
			border-radius: 10rpx;
			font-size: 28rpx;
			color: white;
			text-align: center;
			line-height: 80rpx;
			margin-top: 200rpx;
		}
		.button2{
			width: 90%;
			height: 80rpx;
			background-color: $uni-main-color;
			border-radius: 10rpx;
			font-size: 28rpx;
			color: white;
			text-align: center;
			line-height: 80rpx;
			margin-top: 50rpx;
		}
	}
</style>
